﻿using FastCodeGeneration.Core.Framework;
using FastCodeGeneration.Entity;
using FastCodeGeneration.IRepository;
using FastCodeGeneration.IService;
using FastCodeGeneration.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FastCodeGeneration.Service
{
    public class TableColumnService : BaseServices<ITableColumnRepository, TableColumn>, ITableColumnService
    {
        public TableColumnService(ITableColumnRepository tableColumnRepository) : base(tableColumnRepository)
        {
        }
        public List<TableColumn> GetTableColumns(int projectId, string tableName)
        {
            var result = _repository.GetByTableNames(projectId, new List<string> { tableName });
            return result.First().Value;
        }
    }
}
